<%--
  Created by IntelliJ IDEA.
  User: bryant
  Date: 10/31/12
  Time: 2:34 PM
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="display" uri="http://displaytag.sf.net" %>
<%@ taglib prefix="code" uri="/WEB-INF/tld/code.tld" %>
<script type="text/javascript">
</script>
<%
    String path = request.getContextPath();
%>
<form id="storageSearch" action="storage_search" method="post">
    <div id="main-content">
        <s:if test="hasActionMessages()">
            <div class="notification success png_bg"><a href="#" class="close"><img
                    src="<%=path%>/images/icons/cross_grey_small.png" title="Close this notification" alt="close"/></a>

                <div><s:actionmessage/></div>
            </div>
        </s:if>
        <div id="attentionSelect" style="display: none;" class="notification attention png_bg">
            <a href="#" class="close"><img src="<%=path %>/images/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a>
            <div> 请至少选择一条记录 </div>
        </div>
        <div>
            <table>
                <tr>
                    <td width="10%"><label>商品名称</label></td>
                    <td colspan="3"><s:select id="combobox" list="productList" name="product.Id" headerKey="" headerValue="请选择" listKey="id" listValue="productName"/>
                    </td>
                </tr>
                <tr>
                <td><label>商品编号</label></td>
                <td colspan="3"><s:textfield name="product.productNo" cssClass="text-input small-input"/></td>
                </tr>
                <tr>
                    <td><label>商品品牌</label></td>
                    <td width="10%">
                        <code:codeSelect name="product.brandId" cdTypeId="1" headerKey="" headerValue="请选择"/>
                    </td>
                    <td width="6%"><label>商品种类</label></td>
                    <td>
                        <code:codeSelect name="product.categoryId" cdTypeId="2" headerKey="" headerValue="请选择"/>
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                        <input class="button" align="middle" type="submit" value="查询"/>
                        &nbsp;
                        <input class="button" align="middle" type="reset" value="重设" />
                    </td>
                </tr>
            </table>
        </div>
        <div class="content-box">
            <div class="content-box-header" align="center">
                <h3>查询结果</h3>
            </div>
            <s:if test="paginatedList!=null">
            <div class="content-box-content">
                <div class="tab-content default-tab" id="tab1">
                    <display:table name="paginatedList" requestURI="storage_search" sort="external"  id="row">
                        <display:column property="productName" sortProperty="product_name" title="商品名称" sortable="true" headerClass="sortable" style="height:13px" class="display-width"/>
                        <display:column property="storage" sortProperty="storage" title="库存" sortable="true" format="{0,number,00}" headerClass="sortable" style="height:13px;width:50px"/>
                        <display:column paramId="sid" paramProperty="id" title="<lable style='color:#57A000;font-size:15px'> 操作</lable>">
                            <a title="入库" href="storage_loadStoragePutInPage?storage.productId=${row.id}"><img alt="PutIn" height="18px" width="18px" src="<%=path %>/images/icons/down.png"></a>
                            <a title="出库" href="storage_loadStorageRemovalPage?storage.productId=${row.id}"><img alt="Delete" height="18px" width="18px" src="<%=path %>/images/icons/up.png"></a>
                        </display:column>
                    </display:table>
                </div>
            </div>
            </s:if>
        </div>
    </div>
</form>